// extract module
var fs = require('fs');
var http = require('http');

// create and run web server at 52273
http.createServer(function(request, response) {
	// read image file
	fs.readFile('resources\\Example.JPG', function(error, data) {
		response.writeHead(200, {'Content-Type': 'image/jpeg'});
		response.end(data);
	});
}).listen(52273, function() {
	console.log('Server running at http://127.0.0.1:52273');
});

// create and run web server at 52274
http.createServer(function(request, response) {
	// read mp3 file
	fs.readFile('resources\\Kalimba.mp3', function(error, data) {
		response.writeHead(200, {'Content-Type': 'audio/mp3'});
		response.end(data);
	});
}).listen(52274, function() {
	console.log('Server running at http://127.0.0.1:52274');
});